package com.design.patterns.list.factory.absfactory.pizza;

/**
 * 抽象pizza产品
 * pizza可以有很多种
 * @author Wangzhiwen
 */
public abstract class Pizza {

    /**
     * pizza的名字，抽象出共同的属性
     */
    private String pizzaName;

    /**
     * 各子类不同的实现
     */
    public abstract void prepare();

    public void bake() {
        System.out.println(pizzaName + " baking;");
    }

    public void cut() {
        System.out.println(pizzaName + " cutting;");
    }

    //打包
    public void box() {
        System.out.println(pizzaName + " boxing;");
    }

    public String getPizzaName() {
        return pizzaName;
    }

    public void setPizzaName(String pizzaName) {
        this.pizzaName = pizzaName;
    }
}
